package com.xxw.yygh.statistic.controller;

import com.xxw.yygh.common.result.R;
import com.xxw.yygh.statistic.service.StatisticsService;
import com.xxw.yygh.vo.order.OrderCountQueryVo;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.Map;

@RestController
@RequestMapping("/admin/statistic")
public class StatisticsController {

    @Resource
    private StatisticsService statisticsService;

    @GetMapping("/countByDate")
    public R statistics(OrderCountQueryVo orderCountQueryVo){
        Map<String, Object> map = statisticsService.statistics(orderCountQueryVo);
        return R.ok().data(map);
    }

}
